const express = require('express')
const router = express.Router()
const expressjoi = require('@escook/express-joi')
const { add_cate_schema, delete_cate_schema, get_cate_schema, update_cate_schema } = require('../schema/artcate')

const artCate_handler = require('../router_handler/artcate')
router.get('/cates', artCate_handler.getArtCates)
router.get('/addcates', expressjoi(add_cate_schema), artCate_handler.addArticleCates)
router.get('/deletecate/:id', expressjoi(delete_cate_schema), artCate_handler.deleteCateByid)
router.get('/cates/:id', expressjoi(get_cate_schema), artCate_handler.getArtCateByid)
router.post('/updatecate', expressjoi(update_cate_schema), artCate_handler.updateCateById)
module.exports = router